package com.linln.wtp.controller.violation;

import com.linln.common.utils.UUIDUtil;
import com.linln.common.utils.ViolationHttpUtils;
import com.linln.component.cache.util.RedisUtil;
import com.linln.modules.violation.service.ViolationService;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.regex.Pattern;

/**
 * @author : pengliang
 * @version V1.0
 * @Project: timo
 * @Package com.linln.wtp.controller.violation
 * @Descriptio /**
 * @Project: timo
 * @Package com.linln.wtp.controller.violation
 * @Description: TODO
 * @date Date : 2021年01月07日 15:48
 */
@RestController
@RequestMapping("violation")
public class ViolationController {

    @Autowired
    private ViolationService violationService;


    @PostMapping
    public Map<String, Object> queryViolation(@RequestParam("plate") String plate, @RequestParam("engineno") String engineno, @RequestParam("frameno") String frameno) {
        return violationService.queryViolation(plate, engineno, frameno);
    }


    @GetMapping("/{id}")
    public Map<String, Object> queryViolationByUUID(@PathVariable("id") String id) {
        return violationService.queryViolationByUUID(id);
    }


}
